<template>
  <div class="footPar">
    <Subscribe></Subscribe>
    <div class="foot">
      <!-- 顶部内容 -->
      <div class="wCen">
        <div class="foot_t">
          <div class="foot_t_l">
            <div class="logo l1">
              <a :href="urlPrefix + '/'" class="a"><img src="@/assets/img/logo-big-white.png" alt="" class="img" /></a>
            </div>
            <div class="logo l2">
              <a href="http://www.reed-sinopharm.com/" target="_blank"><img src="@/assets/images/logo_guoyao.png" alt="" class="img" /></a>
            </div>
          </div>
          <div class="foot_t_r">
            <p class="title">{{ localeCn?'联系我们':'CONTACT'}}</p>
            <div class="txt">
              <div class="imgBox"><img src="@/assets/images/foot_address.png" alt="" class="img" /></div>
              <span>{{ localeCn?'北京市朝阳区新源南路1-3号 平安国际金融中心B座15层（北京总部）':'No. 1-3, Xinyuan South Road, Chaoyang District, Beijing, Ping An International Finance Center, block B, 15 level.' }}</span>
            </div>
            <div class="txt">
              <div class="imgBox"><img src="@/assets/images/foot_postcode.png" alt="" class="img" /></div>
              <span>100027</span>
            </div>
            <div class="txt">
              <div class="imgBox"><img src="@/assets/images/foot_tel.png" alt="" class="img" /></div>
              <span>+86-10-8455-6677</span>
            </div>
            <div class="txt">
              <div class="imgBox"><img src="@/assets/images/foot_email.png" alt="" class="img" /></div>
              <a href="mailto:pchi@reedsinopharm.com" target="_blank">pchi@reedsinopharm.com</a>
            </div>
          </div>
        </div>
        <!-- 中间二维码 -->
        <div class="foot_m">
          <!-- 二维码 -->
          <div class="codeBox">
            <div class="code" v-for="(item, idx) in listQrCode" :key="idx">
              <img :src="item.imageUrl" alt="" class="img" />
              <p class="txt">{{ localeCn ? item.title : item.titleEn }}</p>
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- 底部版权信息 -->
    <div class="foot_b"><Common-copyright /></div>
  </div>
</template>

<script>
import { getListQrCode } from "@/api/common";
import Subscribe from "./Subscribe.vue";
export default {
  components: { Subscribe },
  name: "Foot",
  data() {
    return {
      listQrCode: [],
    };
  },
  mounted() {
    this.getListQrCodeFun();
  },
  methods: {
    // 获取页面底部二维码
    getListQrCodeFun() {
      this.invoke(getListQrCode).then((res) => {
        if (res && res.code == 200) {
          this.listQrCode = res.data;
        }
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.footPar {
}
.foot {
  background-color: #e35191;
  p {
    margin: 0;
  }
  &_t {
    display: flex;
    padding-top: 90px;
    padding-bottom: 65px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    &_l,
    &_r {
      width: 50%;
      flex-grow: 1;
    }
    &_l {
      display: flex;
      justify-content: flex-start;
      flex-direction: column;
      .logo {
        display: inline-flex;
        align-items: center;
        .a {
          width: 100%;
        }
        &.l1 {
          width: 240px;
        }
        &.l2 {
          width: 300px;
        }
        .img {
          max-width: 100%;
          max-height: 100%;
        }

        &:last-child {
          margin-top: 60px;
        }
      }
    }

    &_r {
      color: #fff;
      .title {
        font-size: 32px;
        margin-bottom: 82px;
        position: relative;
        &::after {
          width: 80px;
          bottom: -26px;
          content: "";
          display: inline-block;
          height: 4px;
          border-radius: 2px;
          position: absolute;
          left: 0;
          background-color: #fff;
        }
      }
      .txt {
        &:not(:last-child) {
          margin-bottom: 25px;
        }
        display: flex;
        align-items: center;
        color: #fff;
        .imgBox {
          display: flex;
          justify-content: center;
          align-items: center;
          width: 22px;
          margin-right: 30px;
          flex-shrink: 0;
          .img {
            max-width: 100%;
            max-height: 100%;
          }
        }
      }
    }
  }
  &_m {
    padding: 44px 0 50px;
    // 二维码
    .codeBox {
      display: flex;
      justify-content: center;
      color: #fff;

      .code {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100px;

        &:not(:last-child) {
          margin-right: 25px;
        }

        .img {
          max-height: 100%;
          max-width: 100%;
          margin-bottom: 10px;
          border-radius: 4px;
          overflow: hidden;
          padding:4px;
          background-color: #fff;
        }

        .txt {
          font-size: 14px;
        }
      }
    }
  }
  @media (min-width: 1441px) and (max-width: 1750px) {
    @function scale($currentSize) {
      @return calc(#{$currentSize} * #{$global_scale_1600});
    }
    &_t {
      padding-top: scale(90px);
      padding-bottom: scale(65px);
      &_l {
        .logo {
          &.l1 {
            width: scale(240px);
          }
          &.l2 {
            width: scale(300px);
          }
          &:last-child {
            margin-top: scale(60px);
          }
        }
      }
      &_r {
        .title {
          font-size: scale(32px);
          margin-bottom: scale(82px);
          &::after {
            width: scale(80px);
            bottom: scale(-26px);
          }
        }
        .txt {
          &:not(:last-child) {
            margin-bottom: scale(25px);
          }
          .imgBox {
            @include w(scale(22px * 1.2));
            margin-right: scale(30px);
          }
        }
      }
    }
    &_m {
      padding: scale(44px) 0 scale(50px);
      .codeBox {
        .code {
          width: scale(100px);
          &:not(:last-child) {
            margin-right: scale(25px);
          }
        }
      }
    }
  }
  @media screen and (min-width: 1281px) and (max-width: 1440px) {
    @function scale($currentSize) {
      @return calc(#{$currentSize} * #{$global_scale_1440});
    }
    &_t {
      padding-top: scale(90px);
      padding-bottom: scale(65px);
      &_l {
        .logo {
          &.l1 {
            width: scale(240px);
          }
          &.l2 {
            width: scale(300px);
          }
          &:last-child {
            margin-top: scale(60px);
          }
        }
      }
      &_r {
        .title {
          font-size: scale(32px);
          margin-bottom: scale(82px);
          &::after {
            width: scale(80px);
            bottom: scale(-26px);
          }
        }
        .txt {
          &:not(:last-child) {
            margin-bottom: scale(25px);
          }
          .imgBox {
            @include w(scale(22px * 1.2));
            margin-right: scale(30px);
          }
        }
      }
    }
    &_m {
      padding: scale(44px) 0 scale(50px);
      .codeBox {
        .code {
          width: scale(100px);
          &:not(:last-child) {
            margin-right: scale(25px);
          }
        }
      }
    }
  }
  @media screen and (min-width: 768px) and (max-width: 1280px) {
    @function scale($currentSize) {
      @return calc(#{$currentSize} * #{$global_scale_1280});
    }
    &_t {
      padding-top: scale(90px);
      padding-bottom: scale(65px);
      &_l {
        .logo {
          &.l1 {
            width: scale(240px);
          }
          &.l2 {
            width: scale(300px);
          }
          &:last-child {
            margin-top: scale(60px);
          }
        }
      }
      &_r {
        font-size: 12px;
        .title {
          font-size: scale(32px);
          margin-bottom: scale(82px);
          &::after {
            width: scale(80px);
            bottom: scale(-26px);
          }
        }
        .txt {
          &:not(:last-child) {
            margin-bottom: scale(25px);
          }
          .imgBox {
            @include w(scale(20px));
            margin-right: scale(30px);
          }
        }
      }
    }
    &_m {
      padding: scale(44px) 0 scale(50px);
      .codeBox {
        .code {
          width: scale(100px * 1.2);
          &:not(:last-child) {
            margin-right: scale(25px);
          }
          .txt {
            font-size: 12px;
          }
        }
      }
    }
  }
  @media (max-width: 767px) {
    @function scale($currentSize) {
      @return calc(#{$currentSize} * #{$global_scale_750});
    }
    padding-top: 30px;
    &_t {
      padding-top: scale(90px);
      padding-bottom: scale(65px);
      flex-direction: column;
      align-items: center;
      &_l {
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
        margin-bottom: 30px;
        .logo {
          &.l1 {
            width: scale(240px);
          }
          &.l2 {
            width: scale(300px);
          }
          &:last-child {
            margin-top: 0;
          }
        }
      }
      &_r {
        width: 100%;
        .title {
          font-size: scale(32px);
          margin-bottom: scale(82px);
          display: none;
          &::after {
            width: scale(80px);
            bottom: scale(-26px);
          }
        }
        .txt {
          font-size: 12px;
          &:not(:last-child) {
            margin-bottom: scale(25px);
          }
          .imgBox {
            width: 14px;
            height: 14px;
            margin-right: 10px;
          }
        }
      }
    }
    &_m {
      padding: scale(44px) 0 scale(50px);
      .codeBox {
        .code {
          width: 70px;
          &:not(:last-child) {
            margin-right: scale(25px);
          }
          .img{
            width: 60px;
          }
          .txt{
            font-size: 12px;
          }
        }
      }
    }
  }
}
</style>
